import { Pass } from './Pass'

class ExtractBloomStage extends Pass {
  constructor (scene) {
    super(scene)
    this.name = 'czm_extractBloom1'
  }

  fragmentShader () {
    return `
      in vec2 v_textureCoordinates;
      uniform sampler2D bloomTexture;
      void main() {
        out_FragColor = texture(bloomTexture, v_textureCoordinates);
      }
    `
  }

  createStage () {
    this.stage = new GC.PostProcessStage({
      name: this.name,
      fragmentShader: this.fragmentShader()
    })
  }
}

export default ExtractBloomStage
